import pytest
import requests


class UpDown():
    def setup_method(self):
        self.se = requests.Session()
class UpDown2():
    @classmethod
    def setup_class(cls):
        #构造url
        cls.url_index = r'http://172.16.22.104:8080/bsams/front/login.do'
        cls.url_vericode = r'http://172.16.22.104:8080/bsams/front/vericode.do'
        #构造 data
        cls.data_login = {'taskId': 1,'loginName': 'test11', 'password': '123456', 'vericode': 'shtd'}
        #发送请求
        cls.se = requests.Session()
        cls.se.get(cls.url_index)
        cls.se.get(cls.url_vericode)
        cls.se.post(cls.url_index, data=cls.data_login)
